<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>在线预览</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all-gray.css" />
<script language="javascript">
// ---------------------=== init WebOffice ===---------------------- //
var initOffice = function() {
	document.getElementById('WebOffice1');
	
	webOffice.LoadOriginalFile("test","docx");
    webOffice.SetToolBarButton2("Menu Bar",1,8);
    webOffice.SetToolBarButton2("Standard",1,8);
    webOffice.SetToolBarButton2("Formatting",1,8);
    webOffice.ShowToolBar(true);		
	
}

var closeOffice = function() {
	var webOffice = document.getElementById('WebOffice1');
	webOffice.CloseDoc(0);
	webOffice.removeNode(true);	
}


var Office = {
	init : initOffice,
	close : closeOffice
}

window.onload = function() {
	var webOffice = document.getElementById('WebOffice1');

	webOffice.LoadOriginalFile("test","docx");
    webOffice.SetToolBarButton2("Menu Bar",1,8);
    webOffice.SetToolBarButton2("Standard",1,8);
    webOffice.SetToolBarButton2("Formatting",1,8);
    webOffice.ShowToolBar(true);
}

window.onunload = function() {
	var webOffice = document.getElementById('WebOffice1');
	webOffice.CloseDoc(0);
	webOffice.removeNode(true);		
}

</script>
 
</head>
<body>
<!-- -----------------------------== 装载weboffice控件 ==--------------------------------- -->
<object id='WebOffice1' height="586" width="100%" style="LEFT: 0px; TOP: 0px"
    classid='clsid:E77E049B-23FC-4DB8-B756-60529A35FAD5' 
   codebase="weboffice.cab">
	<param name='_ExtentX' value='6350'><param name='_ExtentY' value='6350'>
</object>

<!-- --------------------------------== 结束装载控件 ==----------------------------------- -->
</body>
</html>
